package com.hntech.base.juc.lock;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @Autho changqi.wu
 * @Date 路在脚下，使劲踩！
 */
public class Biz {

    private static int count = 0;
    private static Lock lock = new ReentrantLock();

    public void count() {
        lock.lock();
        try {
            count++;
            Thread.currentThread().sleep(1);
            System.out.println(count);
        } catch (Exception e) {

        } finally {
            lock.unlock();
        }


    }


}
